#ifndef PARAFLUIDSPHDENSITY_H
#define PARAFLUIDSPHDENSITY_H

#include "parafluidatomvoxelizer.h"
#include "parafluidsph.h"

namespace ParaFluid
{
	
	class DensityUpdater
		: public AtomVoxelizer::ReadWriteVisitor
	{
		
	public:
		
		virtual ~DensityUpdater();
		
		DensityUpdater();
		
		void visit(Atom & value);
		
		void updateDensity(SPH & sph);
		
		void updateDensityParallel(SPH & sph, int indexFirst, int indexLast);
		
	private:
		
		SPH * _SPH;
		
		DensityUpdater(const DensityUpdater & other);
		
		DensityUpdater & operator= (const DensityUpdater & rhs);
		
	};
	
}

#endif
